package com.wzdigit.wms.basic.mapper.core.order;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.client.response.inv.TrsnReportExt;
import com.wzdigit.wms.basic.domain.asn.AsnDtlGoods;
import com.wzdigit.wms.basic.client.response.asnHeader.ReceiveReportSNExt;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 收货通知单明细 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2021-01-12
 */
@MyBatisRepository
public interface AsnDtlGoodsMapper extends BaseMapper<AsnDtlGoods> {

	AsnDtlGoods selectAsnTypeIsR01BySn(@Param("sn") String sn);
	
    List<AsnDtlGoods> selectAsnTypeIsR01BySnList(@Param("snList") List<String> snList);

    List<ReceiveReportSNExt> searchReceiveReportSN(@Param("asnNo") String asnNo, @Param("asnLineNo") String asnLineNo);

    List<ReceiveReportSNExt> searchNewReceiveReportSN(@Param("asnNo") String asnNo, @Param("asnLineNo") String asnLineNo);

    List<TrsnReportExt> searchTrsnReportExt(@Param("asnNo") String asnNo, @Param("asnLineNo") String asnLineNo,
                                            @Param("goodsSnList") List<String> goodsSnList);

    BigDecimal selectSumQtyByDtlId(@Param("asnDtlId") Integer asnDtlId);

    List<AsnDtlGoods> selectAsnDtlGoodsByAsnNo(@Param("asnNo") String asnNo);

    List<AsnDtlGoods> selectByDltIds(@Param("asnDtlIds") List<Integer> asnDtlIds);

    Integer selectCountByQastatus(@Param("dtlId") Integer dtlId,@Param("qaStatus") Integer qaStatus);
}
